package com.chx.three.mama.activities;

import android.content.Intent;
import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.chx.three.mama.R;
import com.chx.three.mama.view.Topbar;
import com.lidroid.xutils.ViewUtils;
import com.lidroid.xutils.view.annotation.ContentView;
import com.lidroid.xutils.view.annotation.ViewInject;
@ContentView(R.layout.activity_setting)
public class SettingActivity extends ActionBarActivity implements View.OnClickListener, Topbar.onTopbarClickListener {
    @ViewInject(R.id.setting_invite_frient)
    LinearLayout mllInviteFrient;
    @ViewInject(R.id.setting_address)
    LinearLayout mllAddress;
    @ViewInject(R.id.setting_bindQQ)
    LinearLayout mllBindQQ;
    @ViewInject(R.id.setting_reputation)
    LinearLayout mllReputation;
    @ViewInject(R.id.setting_app_recommend)
    LinearLayout mllAppRecommend;
    @ViewInject(R.id.setting_visit_yuer)
    LinearLayout mllVisitYuer;
    @ViewInject(R.id.setting_about_us)
    LinearLayout mllAboutUs;
    @ViewInject(R.id.setting_service)
    LinearLayout mllService;
    @ViewInject(R.id.setting_user_id)
    TextView mTxtUserId;
    @ViewInject(R.id.setting_version)
    TextView mTxtVersion;
    @ViewInject(R.id.topbar)
    Topbar topbar;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        ViewUtils.inject(this);
        setOnClick();
    }
    public void setOnClick(){
        mllInviteFrient.setOnClickListener(this);
        mllAddress.setOnClickListener(this);
        mllBindQQ.setOnClickListener(this);
        mllReputation.setOnClickListener(this);
        mllAppRecommend.setOnClickListener(this);
        mllVisitYuer.setOnClickListener(this);
        mllAboutUs.setOnClickListener(this);
        mllService.setOnClickListener(this);
        topbar.setOnTopbarClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.setting_invite_frient:
                break;
            case R.id.setting_address:
                Intent intent=new Intent(this,CityCheckActivity.class);
                startActivity(intent);
                break;
            case R.id.setting_bindQQ:
                break;
            case R.id.setting_reputation:
                break;
            case R.id.setting_app_recommend:
                break;
            case R.id.setting_visit_yuer:
                break;
            case R.id.setting_about_us:
                break;
            case R.id.setting_service:
                break;
        }
    }

    @Override
    public void finish() {
        super.finish();
        overridePendingTransition(0,R.anim.push_right_out);
    }

    @Override
    public void onLeftButtonClick() {
        finish();
    }

    @Override
    public void onRightButtonClick() {

    }

    @Override
    public void onSearchButtonClick() {

    }
}
